Skip to content

Conversation

@mtfishman
Copy link
Collaborator

Closes #27.

The idea here is that this allows customizing the truncation based on the algorithm if needed, in addition to the truncation strategy. The reasoning is that certain algorithm backends might output the spectrum in a different format/ordering, which would require a different implementation of the truncation.

I'm open to suggestions on other ways of implementing this. Right now it is based on passing the TruncatedAlgorithm object into truncate!, which includes both the algorithm and the truncation strategy, and then by default it unwraps just the truncation strategy. An alternative could be to pass the truncation strategy and algorithm as separate arguments, though in general they might not be separate, for example in a sparse/low rank factorization like a randomized SVD or Krylov SVD.

@codecov
Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/implementations/eig.jl 100.00% <100.00%> (ø)
src/implementations/eigh.jl 98.41% <100.00%> (ø)
src/implementations/orthnull.jl 91.28% <100.00%> (ø)
src/implementations/svd.jl 94.65% <100.00%> (ø)
src/implementations/truncation.jl 87.77% <100.00%> (+1.70%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mtfishman
Copy link
Collaborator Author

I talked to @lkdvos about this and we decide against this for now, we can bring it back if there is a compelling use case.

@mtfishman mtfishman closed this May 21, 2025
@lkdvos lkdvos deleted the mf/truncate_alg_customization branch October 10, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the algorithm as an argument to truncate! for more customization

2 participants